package com.softeem.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class BlogExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public BlogExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andBIdIsNull() {
            addCriterion("b_id is null");
            return (Criteria) this;
        }

        public Criteria andBIdIsNotNull() {
            addCriterion("b_id is not null");
            return (Criteria) this;
        }

        public Criteria andBIdEqualTo(Integer value) {
            addCriterion("b_id =", value, "bId");
            return (Criteria) this;
        }

        public Criteria andBIdNotEqualTo(Integer value) {
            addCriterion("b_id <>", value, "bId");
            return (Criteria) this;
        }

        public Criteria andBIdGreaterThan(Integer value) {
            addCriterion("b_id >", value, "bId");
            return (Criteria) this;
        }

        public Criteria andBIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("b_id >=", value, "bId");
            return (Criteria) this;
        }

        public Criteria andBIdLessThan(Integer value) {
            addCriterion("b_id <", value, "bId");
            return (Criteria) this;
        }

        public Criteria andBIdLessThanOrEqualTo(Integer value) {
            addCriterion("b_id <=", value, "bId");
            return (Criteria) this;
        }

        public Criteria andBIdIn(List<Integer> values) {
            addCriterion("b_id in", values, "bId");
            return (Criteria) this;
        }

        public Criteria andBIdNotIn(List<Integer> values) {
            addCriterion("b_id not in", values, "bId");
            return (Criteria) this;
        }

        public Criteria andBIdBetween(Integer value1, Integer value2) {
            addCriterion("b_id between", value1, value2, "bId");
            return (Criteria) this;
        }

        public Criteria andBIdNotBetween(Integer value1, Integer value2) {
            addCriterion("b_id not between", value1, value2, "bId");
            return (Criteria) this;
        }

        public Criteria andBTitleIsNull() {
            addCriterion("b_title is null");
            return (Criteria) this;
        }

        public Criteria andBTitleIsNotNull() {
            addCriterion("b_title is not null");
            return (Criteria) this;
        }

        public Criteria andBTitleEqualTo(String value) {
            addCriterion("b_title =", value, "bTitle");
            return (Criteria) this;
        }

        public Criteria andBTitleNotEqualTo(String value) {
            addCriterion("b_title <>", value, "bTitle");
            return (Criteria) this;
        }

        public Criteria andBTitleGreaterThan(String value) {
            addCriterion("b_title >", value, "bTitle");
            return (Criteria) this;
        }

        public Criteria andBTitleGreaterThanOrEqualTo(String value) {
            addCriterion("b_title >=", value, "bTitle");
            return (Criteria) this;
        }

        public Criteria andBTitleLessThan(String value) {
            addCriterion("b_title <", value, "bTitle");
            return (Criteria) this;
        }

        public Criteria andBTitleLessThanOrEqualTo(String value) {
            addCriterion("b_title <=", value, "bTitle");
            return (Criteria) this;
        }

        public Criteria andBTitleLike(String value) {
            addCriterion("b_title like", value, "bTitle");
            return (Criteria) this;
        }

        public Criteria andBTitleNotLike(String value) {
            addCriterion("b_title not like", value, "bTitle");
            return (Criteria) this;
        }

        public Criteria andBTitleIn(List<String> values) {
            addCriterion("b_title in", values, "bTitle");
            return (Criteria) this;
        }

        public Criteria andBTitleNotIn(List<String> values) {
            addCriterion("b_title not in", values, "bTitle");
            return (Criteria) this;
        }

        public Criteria andBTitleBetween(String value1, String value2) {
            addCriterion("b_title between", value1, value2, "bTitle");
            return (Criteria) this;
        }

        public Criteria andBTitleNotBetween(String value1, String value2) {
            addCriterion("b_title not between", value1, value2, "bTitle");
            return (Criteria) this;
        }

        public Criteria andBContextIsNull() {
            addCriterion("b_context is null");
            return (Criteria) this;
        }

        public Criteria andBContextIsNotNull() {
            addCriterion("b_context is not null");
            return (Criteria) this;
        }

        public Criteria andBContextEqualTo(String value) {
            addCriterion("b_context =", value, "bContext");
            return (Criteria) this;
        }

        public Criteria andBContextNotEqualTo(String value) {
            addCriterion("b_context <>", value, "bContext");
            return (Criteria) this;
        }

        public Criteria andBContextGreaterThan(String value) {
            addCriterion("b_context >", value, "bContext");
            return (Criteria) this;
        }

        public Criteria andBContextGreaterThanOrEqualTo(String value) {
            addCriterion("b_context >=", value, "bContext");
            return (Criteria) this;
        }

        public Criteria andBContextLessThan(String value) {
            addCriterion("b_context <", value, "bContext");
            return (Criteria) this;
        }

        public Criteria andBContextLessThanOrEqualTo(String value) {
            addCriterion("b_context <=", value, "bContext");
            return (Criteria) this;
        }

        public Criteria andBContextLike(String value) {
            addCriterion("b_context like", value, "bContext");
            return (Criteria) this;
        }

        public Criteria andBContextNotLike(String value) {
            addCriterion("b_context not like", value, "bContext");
            return (Criteria) this;
        }

        public Criteria andBContextIn(List<String> values) {
            addCriterion("b_context in", values, "bContext");
            return (Criteria) this;
        }

        public Criteria andBContextNotIn(List<String> values) {
            addCriterion("b_context not in", values, "bContext");
            return (Criteria) this;
        }

        public Criteria andBContextBetween(String value1, String value2) {
            addCriterion("b_context between", value1, value2, "bContext");
            return (Criteria) this;
        }

        public Criteria andBContextNotBetween(String value1, String value2) {
            addCriterion("b_context not between", value1, value2, "bContext");
            return (Criteria) this;
        }

        public Criteria andBTimeIsNull() {
            addCriterion("b_time is null");
            return (Criteria) this;
        }

        public Criteria andBTimeIsNotNull() {
            addCriterion("b_time is not null");
            return (Criteria) this;
        }

        public Criteria andBTimeEqualTo(Date value) {
            addCriterionForJDBCDate("b_time =", value, "bTime");
            return (Criteria) this;
        }

        public Criteria andBTimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("b_time <>", value, "bTime");
            return (Criteria) this;
        }

        public Criteria andBTimeGreaterThan(Date value) {
            addCriterionForJDBCDate("b_time >", value, "bTime");
            return (Criteria) this;
        }

        public Criteria andBTimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("b_time >=", value, "bTime");
            return (Criteria) this;
        }

        public Criteria andBTimeLessThan(Date value) {
            addCriterionForJDBCDate("b_time <", value, "bTime");
            return (Criteria) this;
        }

        public Criteria andBTimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("b_time <=", value, "bTime");
            return (Criteria) this;
        }

        public Criteria andBTimeIn(List<Date> values) {
            addCriterionForJDBCDate("b_time in", values, "bTime");
            return (Criteria) this;
        }

        public Criteria andBTimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("b_time not in", values, "bTime");
            return (Criteria) this;
        }

        public Criteria andBTimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("b_time between", value1, value2, "bTime");
            return (Criteria) this;
        }

        public Criteria andBTimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("b_time not between", value1, value2, "bTime");
            return (Criteria) this;
        }

        public Criteria andBLooksIsNull() {
            addCriterion("b_looks is null");
            return (Criteria) this;
        }

        public Criteria andBLooksIsNotNull() {
            addCriterion("b_looks is not null");
            return (Criteria) this;
        }

        public Criteria andBLooksEqualTo(Integer value) {
            addCriterion("b_looks =", value, "bLooks");
            return (Criteria) this;
        }

        public Criteria andBLooksNotEqualTo(Integer value) {
            addCriterion("b_looks <>", value, "bLooks");
            return (Criteria) this;
        }

        public Criteria andBLooksGreaterThan(Integer value) {
            addCriterion("b_looks >", value, "bLooks");
            return (Criteria) this;
        }

        public Criteria andBLooksGreaterThanOrEqualTo(Integer value) {
            addCriterion("b_looks >=", value, "bLooks");
            return (Criteria) this;
        }

        public Criteria andBLooksLessThan(Integer value) {
            addCriterion("b_looks <", value, "bLooks");
            return (Criteria) this;
        }

        public Criteria andBLooksLessThanOrEqualTo(Integer value) {
            addCriterion("b_looks <=", value, "bLooks");
            return (Criteria) this;
        }

        public Criteria andBLooksIn(List<Integer> values) {
            addCriterion("b_looks in", values, "bLooks");
            return (Criteria) this;
        }

        public Criteria andBLooksNotIn(List<Integer> values) {
            addCriterion("b_looks not in", values, "bLooks");
            return (Criteria) this;
        }

        public Criteria andBLooksBetween(Integer value1, Integer value2) {
            addCriterion("b_looks between", value1, value2, "bLooks");
            return (Criteria) this;
        }

        public Criteria andBLooksNotBetween(Integer value1, Integer value2) {
            addCriterion("b_looks not between", value1, value2, "bLooks");
            return (Criteria) this;
        }

        public Criteria andBCollectsIsNull() {
            addCriterion("b_collects is null");
            return (Criteria) this;
        }

        public Criteria andBCollectsIsNotNull() {
            addCriterion("b_collects is not null");
            return (Criteria) this;
        }

        public Criteria andBCollectsEqualTo(Integer value) {
            addCriterion("b_collects =", value, "bCollects");
            return (Criteria) this;
        }

        public Criteria andBCollectsNotEqualTo(Integer value) {
            addCriterion("b_collects <>", value, "bCollects");
            return (Criteria) this;
        }

        public Criteria andBCollectsGreaterThan(Integer value) {
            addCriterion("b_collects >", value, "bCollects");
            return (Criteria) this;
        }

        public Criteria andBCollectsGreaterThanOrEqualTo(Integer value) {
            addCriterion("b_collects >=", value, "bCollects");
            return (Criteria) this;
        }

        public Criteria andBCollectsLessThan(Integer value) {
            addCriterion("b_collects <", value, "bCollects");
            return (Criteria) this;
        }

        public Criteria andBCollectsLessThanOrEqualTo(Integer value) {
            addCriterion("b_collects <=", value, "bCollects");
            return (Criteria) this;
        }

        public Criteria andBCollectsIn(List<Integer> values) {
            addCriterion("b_collects in", values, "bCollects");
            return (Criteria) this;
        }

        public Criteria andBCollectsNotIn(List<Integer> values) {
            addCriterion("b_collects not in", values, "bCollects");
            return (Criteria) this;
        }

        public Criteria andBCollectsBetween(Integer value1, Integer value2) {
            addCriterion("b_collects between", value1, value2, "bCollects");
            return (Criteria) this;
        }

        public Criteria andBCollectsNotBetween(Integer value1, Integer value2) {
            addCriterion("b_collects not between", value1, value2, "bCollects");
            return (Criteria) this;
        }

        public Criteria andBCheckIsNull() {
            addCriterion("b_check is null");
            return (Criteria) this;
        }

        public Criteria andBCheckIsNotNull() {
            addCriterion("b_check is not null");
            return (Criteria) this;
        }

        public Criteria andBCheckEqualTo(String value) {
            addCriterion("b_check =", value, "bCheck");
            return (Criteria) this;
        }

        public Criteria andBCheckNotEqualTo(String value) {
            addCriterion("b_check <>", value, "bCheck");
            return (Criteria) this;
        }

        public Criteria andBCheckGreaterThan(String value) {
            addCriterion("b_check >", value, "bCheck");
            return (Criteria) this;
        }

        public Criteria andBCheckGreaterThanOrEqualTo(String value) {
            addCriterion("b_check >=", value, "bCheck");
            return (Criteria) this;
        }

        public Criteria andBCheckLessThan(String value) {
            addCriterion("b_check <", value, "bCheck");
            return (Criteria) this;
        }

        public Criteria andBCheckLessThanOrEqualTo(String value) {
            addCriterion("b_check <=", value, "bCheck");
            return (Criteria) this;
        }

        public Criteria andBCheckLike(String value) {
            addCriterion("b_check like", value, "bCheck");
            return (Criteria) this;
        }

        public Criteria andBCheckNotLike(String value) {
            addCriterion("b_check not like", value, "bCheck");
            return (Criteria) this;
        }

        public Criteria andBCheckIn(List<String> values) {
            addCriterion("b_check in", values, "bCheck");
            return (Criteria) this;
        }

        public Criteria andBCheckNotIn(List<String> values) {
            addCriterion("b_check not in", values, "bCheck");
            return (Criteria) this;
        }

        public Criteria andBCheckBetween(String value1, String value2) {
            addCriterion("b_check between", value1, value2, "bCheck");
            return (Criteria) this;
        }

        public Criteria andBCheckNotBetween(String value1, String value2) {
            addCriterion("b_check not between", value1, value2, "bCheck");
            return (Criteria) this;
        }

        public Criteria andTypeIdIsNull() {
            addCriterion("type_id is null");
            return (Criteria) this;
        }

        public Criteria andTypeIdIsNotNull() {
            addCriterion("type_id is not null");
            return (Criteria) this;
        }

        public Criteria andTypeIdEqualTo(Integer value) {
            addCriterion("type_id =", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotEqualTo(Integer value) {
            addCriterion("type_id <>", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdGreaterThan(Integer value) {
            addCriterion("type_id >", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("type_id >=", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdLessThan(Integer value) {
            addCriterion("type_id <", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdLessThanOrEqualTo(Integer value) {
            addCriterion("type_id <=", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdIn(List<Integer> values) {
            addCriterion("type_id in", values, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotIn(List<Integer> values) {
            addCriterion("type_id not in", values, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdBetween(Integer value1, Integer value2) {
            addCriterion("type_id between", value1, value2, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotBetween(Integer value1, Integer value2) {
            addCriterion("type_id not between", value1, value2, "typeId");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNull() {
            addCriterion("user_id is null");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion("user_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserIdEqualTo(Integer value) {
            addCriterion("user_id =", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotEqualTo(Integer value) {
            addCriterion("user_id <>", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThan(Integer value) {
            addCriterion("user_id >", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("user_id >=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThan(Integer value) {
            addCriterion("user_id <", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThanOrEqualTo(Integer value) {
            addCriterion("user_id <=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdIn(List<Integer> values) {
            addCriterion("user_id in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotIn(List<Integer> values) {
            addCriterion("user_id not in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdBetween(Integer value1, Integer value2) {
            addCriterion("user_id between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
            addCriterion("user_id not between", value1, value2, "userId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}